﻿// ===============================================================================
// XCI.NET 西安交通信息WinForm开发框架 2018 版权所有
// ===============================================================================
using System;

namespace XCI.Windows
{
    /// <summary>
    /// 窗口属性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
    public class FormCaptionAttribute : Attribute
    {
        /// <summary>
        /// 代码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 是否可见
        /// </summary>
        public bool Visible { get; set; } = true;

        /// <summary>
        /// 简拼
        /// </summary>
        public string NameSpell { get; set; }

        /// <summary>
        /// 初始化 FormCaptionAttribute 类的新实例。
        /// </summary>
        public FormCaptionAttribute(bool visible)
        {
            Visible = visible;
        }

        /// <summary>
        /// 初始化 FormCaptionAttribute 类的新实例。
        /// </summary>
        public FormCaptionAttribute()
        {
        }

        /// <summary>
        /// 初始化 FormCaptionAttribute 类的新实例。
        /// </summary>
        /// <param name="name">名称</param>
        public FormCaptionAttribute(string name)
        {
            this.Name = name;
        }
    }
}